//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.wsd.smartcarwasher.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wsd.smartcarwasher.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.util.List;

@ApiModel("用户的会员卡")
public class UserCard {


    @ApiModelProperty("用户id")
    private String ucId;
    @ApiModelProperty("用户id")
    private String userId;
    @ApiModelProperty(value = "服务id")
    private Integer serviceId;

    public Integer getServiceId() {
        return serviceId;
    }

    public void setServiceId(Integer serviceId) {
        this.serviceId = serviceId;
    }

    @ApiModelProperty("会员卡id")
    private int cardId;
    @ApiModelProperty("剩余的服务次数")
    private List<WashServiceWithTimes> services;
    @ApiModelProperty("有效截止日期")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date validDate;
    @ApiModelProperty("会员卡信息")
    private Card card;

    @ApiModelProperty("会员卡购买订单信息")
    private CardOrder cardOrder;
    @ApiModelProperty("100 正常  102 被删除了")
    private int  status;
    @ApiModelProperty(value = "剩余次数")
    private Integer leftTimes;

    public Integer getLeftTimes() {
        return leftTimes;
    }

    public void setLeftTimes(Integer leftTimes) {
        this.leftTimes = leftTimes;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public CardOrder getCardOrder() {
        return cardOrder;
    }

    public void setCardOrder(CardOrder cardOrder) {
        this.cardOrder = cardOrder;
    }

    public UserCard() {
    }

    public UserCard(String userId, Card card,String ucId) {
        this.ucId = ucId;
        this.userId = userId;
        this.cardId = card.getId();
        this.services = card.getServiceList();
        this.validDate = DateUtil.getDateLater(DateUtil.getSysDate(), card.getValidDate());
    }

    public String getUcId() {
        return ucId;
    }

    public void setUcId(String ucId) {
        this.ucId = ucId;
    }

    public String getUserId() {
        return this.userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public int getCardId() {
        return this.cardId;
    }

    public void setCardId(int cardId) {
        this.cardId = cardId;
    }

    public List<WashServiceWithTimes> getServices() {
        return this.services;
    }

    public void setServices(List<WashServiceWithTimes> services) {
        this.services = services;
    }

    public Date getValidDate() {
        return this.validDate;
    }

    public void setValidDate(Date validDate) {
        this.validDate = validDate;
    }

    public Card getCard() {
        return this.card;
    }

    public void setCard(Card card) {
        this.card = card;
    }
}


/*
package com.wsd.smartcarwasher.domain;

import com.wsd.smartcarwasher.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.List;

@ApiModel(value = "用户的会员卡")
public class UserCard {
    @ApiModelProperty(value = "用户id")
    private String userId;
    @ApiModelProperty(value = "会员卡id")
    private int cardId;
    @ApiModelProperty(value = "剩余的服务次数")
    private List<WashServiceWithTimes> services;
    @ApiModelProperty(value = "有效截止日期")
    private Date validDate;
    @ApiModelProperty(value = "会员卡信息")
    private Card card;

    public UserCard() {
    }

    public UserCard(String userId, Card card) {
        this.userId = userId;
        this.cardId = card.getId();
        this.services = card.getServiceList();
        this.validDate = DateUtil.getDateBack("-"  + card.getValidDate());
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public int getCardId() {
        return cardId;
    }

    public void setCardId(int cardId) {
        this.cardId = cardId;
    }

    public List<WashServiceWithTimes> getServices() {
        return services;
    }

    public void setServices(List<WashServiceWithTimes> services) {
        this.services = services;
    }

    public Date getValidDate() {
        return validDate;
    }

    public void setValidDate(Date validDate) {
        this.validDate = validDate;
    }

    public Card getCard() {
        return card;
    }

    public void setCard(Card card) {
        this.card = card;
    }
}
*/
